import Vue from 'vue';
import VueRouter from 'vue-router';
import Layout from '@/page/index/'
import PageRouter from './page/'
import ViewsRouter from './views/'
import ExampleRouter from './example/'
const _import = require('./_import').default;
Vue.use(VueRouter);
export default new VueRouter({
	scrollBehavior(to, from, savedPosition) {
	    if(savedPosition){
			return savedPosition
		}else{
			// if (from.meta.keepAlive) {
		 //        from.meta.savedPosition = document.body.scrollTop;
		 //    }
			return {
				x:0,
				y:0
			}
		}
	}
});
export const asyncRouterMap = [].concat(PageRouter, ViewsRouter, ExampleRouter)